from sub_mod import demo_fun
from hierarchy_driver import hiera_driver

class Block1:
    def __init__(self, params):
        var1 = params.get('var1')
        if var1 is None:
            var1 = 0
        var2 = params.get('var2')
        if var2 is None:
            var2 = 1
        data = hiera_driver.read_data()
        demo_fun(var1 + var2)
        demo_fun(var1 - var2)
        demo_fun([d + var1 + var2 for d in data])


if __name__ == '__main__':
    block = Block1({})
